import request from '@/utils/request'

const baseURL = '/api/user'

export function login(username, password, userType) {
  return request({
    url: baseURL + '/login',
    method: 'post',
    data: {
      username, password, userType
    }
  })
}

export function getInfo() {
  return request({
    url: baseURL + '/getInfo',
    method: 'get'
  })
}

export function logout() {
  return request({
    url: baseURL + '/logout',
    method: 'post'
  })
}

export function changePassword(data) {
  return request({
    url: baseURL + '/changePassword',
    method: 'post',
    data
  })
}
